<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-04 15:22:11
 * @LastEditTime: 2023-08-04 15:39:05
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @Description: 
 */

/** @var \Laravel\Lumen\Routing\Router $router */

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
$router->get('/', function ()
    {
    return 'Lumen Api For 1.4.1';
    });

$router->get('/analysis/page', "Analysis\PageController@get");

$router->post('/DingTalkAuth', 'System\UserController@DingTalkAuth');
$router->get('/ver', "System\VersionController@ver");
//登录注册
$router->post('/token', 'System\UserController@login');
$router->post('user/register', 'System\UserController@register');

$router->post('/Mfg/took', "OldController\MfgController@took");
$router->get('/Mfg/list', "OldController\MfgController@list");
$router->get('/Mfg/info', "OldController\MfgController@info");
$router->get('/Mfg/follow', "OldController\MfgController@follow");
$router->get('/Mfg/employee', "OldController\MfgController@employee");
$router->post('/Mfg/addFollow', "OldController\MfgController@addFollow");
$router->post('/Mfg/barcodeStructData', "OldController\MfgController@barcodeStructData");
$router->get('/Mfg/allocKc', "OldController\MfgController@allocKc");
$router->post('/Mfg/alloc', "OldController\MfgController@alloc");
$router->get('/Mfg/getPlace', "OldController\MfgController@getPlace");
$router->get('/Mfg/DmFactorykc', "OldController\MfgController@DmFactorykc");
$router->post('/Mfg/dmReceiver', "OldController\MfgController@dmReceiver");
$router->post('/Mfg/passList', "OldController\MfgController@passList");
$router->post('/Mfg/deletePass', "OldController\MfgController@deletePass");

$router->get('/Menu/wxlist', "OldController\MenuController@wxlist");
$router->post('/MiniProLogin/autologin', "OldController\MiniProLoginController@autologin");
$router->post('/MiniProLogin/login', "OldController\MiniProLoginController@login");

$router->get('/Storage/getBarcode', "OldController\StorageController@getBarcode");
$router->post('/Storage/dmBookingList', "OldController\StorageController@dmBookingList");
$router->post('/Storage/dmBookingMonthList', "OldController\StorageController@dmBookingMonthList");
$router->post('/Storage/deleteDmBooking', "OldController\StorageController@deleteDmBooking");
$router->post('/Storage/saveDmBooking', "OldController\StorageController@saveDmBooking");
$router->post('/Storage/dbList', "OldController\StorageController@dbList");
$router->get('/Storage/dbDelete', "OldController\StorageController@dbDelete");

$router->get('/FlowAdd/flow', "OldController\FlowAddController@flow");



$router->group(["middleware" => ["auth", 'permission.parameter']], function ($router)
    {
    $router->addRoute(['GET', 'POST'], "{model}/{controller}/{action}[/{param}]", function ($model, $controller, $action, $param = null)
        {
        return callController($model, $controller, $action);
        });

    // $router->post('system/user/save',           "System\UserController@save");
    // $router->post('system/user/delete',         "System\UserController@delete");
    // $router->post('system/user/reSetPassWord',  "System\UserController@reSetPassWord");
    // $router->get('system/user/list',            "System\UserController@list");

    // $router->get('/system/menu/my/userMenu', "System\MenuController@userMenu");
    // $router->post('/system/menu/delete',    "System\MenuController@delete");
    // $router->post('/system/menu/save',      "System\MenuController@save");
    // $router->get('/system/menu/list',       "System\MenuController@list");
    // $router->get('/system/menu/role',       "System\MenuController@role");

    // $router->post('/system/department/delete',  "System\DepartmentController@delete");
    // $router->post('/system/department/save',    "System\DepartmentController@add");
    // $router->get('/system/department/list',     "System\DepartmentController@list");
    // $router->get('/system/department/treelist', "System\DepartmentController@treelist");

    // $router->get('/system/role/list',       "System\RoleController@list");
    // $router->post('/system/role/save',      "System\RoleController@save");
    // $router->post('/system/role/delete',    "System\RoleController@delete");
    // $router->get('/system/role/menu',       "System\RoleController@menu");
    // $router->get('/system/role/department', "System\RoleController@department");

    // $router->post('/system/role/savePermission',     "System\RoleController@savePermission");

    // $router->get('/system/table/list',      "System\TableController@list");
    // $router->post('/system/table/save',     "System\TableController@save");
    // $router->get('/system/table/info',      "System\TableController@info");
    // $router->post('/system/table/delete',   "System\TableController@delete");

    // $router->get('/system/dic/getCategory',     "System\DicController@getCategory");
    // $router->get('/system/dic/deleteCategory',  "System\DicController@deleteCategory");
    // $router->post('/system/dic/saveCategory',   "System\DicController@saveCategory");
    // $router->get('/system/dic/get',             "System\DicController@get");
    // $router->get('/system/dic/list',            "System\DicController@list");
    // $router->get('/system/dic/getDicData',      "System\DicController@getDicData");
    // $router->post('/system/dic/save',           "System\DicController@save");
    // $router->post('/system/dic/delete',         "System\DicController@delete");
    // $router->get('/system/dic/enable',          "System\DicController@enable");

    // $router->get('system/queueMessage/receiveList',         "System\QueueMessageController@receiveList");
    // $router->get('system/queueMessage/sendList',            "System\QueueMessageController@sendList");
    // $router->get('system/queueMessage/getReceiveUser',      "System\QueueMessageController@getReceiveUser");
    // $router->post('system/queueMessage/deletes',            "System\QueueMessageController@deletes");
    // $router->post('system/queueMessage/updateReadStatus',   "System\QueueMessageController@updateReadStatus");
    // $router->post('system/queueMessage/sendPrivateMessage', "System\QueueMessageController@sendPrivateMessage");

    // $router->get('/system/autoCode/list',       "System\AutoCodeController@list");
    // $router->post('/system/autoCode/delete',    "System\AutoCodeController@delete");
    // $router->post('/system/autoCode/save',      "System\AutoCodeController@save");

    // $router->get('/system/mpcLocation/list',    "System\MpcLocationController@list");
    // $router->post('/system/mpcLocation/delete', "System\MpcLocationController@delete");
    // $router->post('/system/mpcLocation/save',   "System\MpcLocationController@save");

    // $router->post('/system/attachment/upload',    "System\AttachmentController@upload");



    // $router->get('/storage/storage/list',           "Storage\StorageController@list");
    // $router->get('/storage/storage/storageItems',   "Storage\StorageController@storageItems");

    // $router->get('/storage/inventory/list',      "Storage\InventoryController@list");
    // $router->post('/storage/inventory/audit',    "Storage\InventoryController@audit");
    // $router->post('/storage/inventory/noaudit',  "Storage\InventoryController@noaudit");
    // $router->post('/storage/inventory/delete',   "Storage\InventoryController@delete");
    // $router->get('/storage/inventory/info',     "Storage\InventoryController@info");
    // $router->post('/storage/inventory/save',     "Storage\InventoryController@save");
    // $router->get('/storage/inventory/details',     "Storage\InventoryController@details");




    // $router->get('/baseData/material/list',             "BaseData\MaterialController@list");
    // $router->post('/baseData/material/delete',          "BaseData\MaterialController@delete");
    // $router->post('/baseData/material/save',            "BaseData\MaterialController@save");
    // $router->get('/baseData/material/categorylist',     "BaseData\MaterialController@categorylist");
    // $router->get('/baseData/material/categorydelete',   "BaseData\MaterialController@categorydelete");
    // $router->post('/baseData/material/categorysave',    "BaseData\MaterialController@categorysave");

    // $router->get('/baseData/company/list',              "BaseData\CompanyController@list");
    // $router->post('/baseData/company/delete',           "BaseData\CompanyController@delete");
    // $router->post('/baseData/company/save',             "BaseData\CompanyController@save");
    // $router->get('/baseData/company/categorylist',      "BaseData\CompanyController@categorylist");
    // $router->get('/baseData/company/categorydelete',    "BaseData\CompanyController@categorydelete");
    // $router->post('/baseData/company/categorysave',     "BaseData\CompanyController@categorysave");


    // $router->get('/baseData/unit/list',             "BaseData\UnitController@list");
    // $router->post('/baseData/unit/delete',          "BaseData\UnitController@delete");
    // $router->post('/baseData/unit/save',            "BaseData\UnitController@save");
    // $router->get('/baseData/unit/categorylist',     "BaseData\UnitController@categorylist");
    // $router->get('/baseData/unit/categorydelete',   "BaseData\UnitController@categorydelete");
    // $router->post('/baseData/unit/categorysave',    "BaseData\UnitController@categorysave");
    });